'''
Created on Jan 11, 2013

@author: Aaron
'''

class Sort():
    '''
    classdocs
    '''
    def __init__(self, sortList, compare = None, key = None, reverse = False):
        self.sortList = sortList
        self.compare = compare
        self.key = key
        self.reverse = reverse
        
    
    def sort(self):
        pass
    
    def swap(self, sortList, i, j):
        sortList[i], sortList[j] = sortList[j], sortList[i]
        
    def less(self, sortList, i, j):
        if self.compare != None:
            return self.compare(sortList, i, j) < 0
        else:
            return cmp(sortList, i, j) < 0
        